import axios from 'axios'
import { request } from '@/utils/request'
import { request_t,instance} from '@/utils/request2';
//首页 晒场
export function GetPageList(loginId,uid,pageIndex,type,isall) {
    const url = request.baseURL + '/api/wap/daily/GetDailyList';
    const data={
        loginId:loginId,
        uid:uid,
        pageindex:pageIndex,
        type:type,
        isall:isall
    };
    return axios.get(url, {
        params: data
    }).then((res) => {
        return Promise.resolve(res.data);
    });
};
//晒场评论添加
export function CommentAdd(data) {
    const url ='/api/wap/daily/CommentAdd';
    let res=request_t(url, 'post', data)
    return res
};
//删除y
export function CommentDel(commentId) {
    const data={
        commentId:commentId
    };
    let res=request_t(url, 'post', data)
    return res
};
//点赞 DailyLike
export function DailyLike(uid,dailyId) {
    const data={
        dailyId:dailyId
    };
    const url ='/api/wap/daily/DailyLike';
    let res=request_t(url, 'post', data)
    return res
  
};
//添加晒场
export function DailyAdd(data) {
    const url ='/api/wap/daily/DailyAdd';
    let res=request_t(url, 'post', data)
    return res
};
//删除晒场 Remove
export function Remove(id) {
    const data={
        dailyid:id
    };
    console.log(data);
    const url ='/api/wap/daily/Remove';
    let res=request_t(url, 'post', data)
    return res
};